Skip to content

feat: Bounty Countdown Timer — real-time countdown with urgency indicators (Bounty #826)#1359

Open
a918124259a wants to merge 1 commit into
SolFoundry:mainfrom
a918124259a:feat/bounty-countdown-timer
Open

feat: Bounty Countdown Timer — real-time countdown with urgency indicators (Bounty #826)#1359
a918124259a wants to merge 1 commit into
SolFoundry:mainfrom
a918124259a:feat/bounty-countdown-timer

Conversation

@a918124259a
Copy link
Copy Markdown

Summary

Implements the Bounty Countdown Timer component for bounty cards and detail pages with real-time updates and visual urgency indicators.

What's New

  • BountyCountdownTimer — standalone React component with live countdown (d/h/m/s)
  • Compact & full modes — compact for bounty cards, full for detail page sidebar
  • Visual urgency states:
    • 🟡 Amber warning when < 24 hours remain
    • 🔴 Red urgent + pulsing icon when < 1 hour remain
    • ⚫ Expired state when deadline passes
  • Real-time updates — refreshes every second via setInterval, auto-stops when expired
  • lib/utils.ts — adds missing shared utilities (timeLeft, timeAgo, formatCurrency, LANG_COLORS)

Files Changed

  • frontend/src/components/bounty/BountyCountdownTimer.tsx — new component
  • frontend/src/components/bounty/BountyCard.tsx — uses BountyCountdownTimer (compact)
  • frontend/src/components/bounty/BountyDetail.tsx — uses BountyCountdownTimer (full)
  • frontend/src/lib/utils.ts — new shared utilities

Testing

  • Component handles expired deadlines gracefully
  • Timer auto-stops via clearInterval when expired to prevent memory leaks
  • Uses React best practices (useEffect cleanup, useState initializer)

@a918124259a
Copy link
Copy Markdown
Author

Hi! Just checking in on this PR. The countdown timer component is complete with:

  • Real-time updates (days/hours/minutes/seconds)
  • Color-coded urgency indicators (amber <24h, red <1h, expired)
  • Compact mode for cards, full mode for detail page
  • All CI checks passing

Ready for review when you have time. Thanks!

@a918124259a
Copy link
Copy Markdown
Author

@maintainers This PR has been ready for review for several days. The countdown timer is a clean implementation that addresses Bounty #826 requirements:

✅ Real-time countdown (days/hours/minutes/seconds)
✅ Urgency indicators (amber/red states)
✅ Responsive design
✅ All CI checks passing

Would appreciate a review when possible. Happy to make any adjustments if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-wallet PR is missing a Solana wallet for bounty payout

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant